package cn.edu.gdpt.mobile213.mobile2121606097wjc0414;

import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

import android.os.Bundle;

public class MainActivity extends AppCompatActivity {
    private RecyclerView rvmaincar;
    private String[] carlineno;
    private String[] carlinename;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        initview();
        rvmaincar.setLayoutManager(new LinearLayoutManager(this));
        carlineadapter adapter=new carlineadapter(carlineno,carlinename);
        rvmaincar.setAdapter(adapter);
    }

    private void initview() {
        rvmaincar=(RecyclerView) findViewById(R.id.rvmaincarline);
    }
}